package com.xuln.ipp.form;

import java.util.List;

import com.xuln.framework.form.BaseForm;
import com.xuln.ipp.entity.Article;

public class ArticleForm extends BaseForm {
	private String title;
	// 作者
	private String author;
	// 内容
	private String content;
	// 页面关键词
	private String metaKeywords;
	// 页面描述
	private String metaDescription;
	// 是否发布
	private boolean isPublication = true;
	// 是否置顶
	private boolean isTop = false;
	// 是否为推荐文章
	private boolean isRecommend = false;
	// HTML静态文件路径（首页）
	private String htmlFilePath;
	// 点击数
	private int hits = 0;
	// 文章ID
	private long categoryId;
	// 文章
	private Article article;

	// 文章列表
	private List<Article> articles;

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getAuthor() {
		return author;
	}

	public void setAuthor(String author) {
		this.author = author;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getMetaKeywords() {
		return metaKeywords;
	}

	public void setMetaKeywords(String metaKeywords) {
		this.metaKeywords = metaKeywords;
	}

	public String getMetaDescription() {
		return metaDescription;
	}

	public void setMetaDescription(String metaDescription) {
		this.metaDescription = metaDescription;
	}

	public boolean isPublication() {
		return isPublication;
	}

	public void setPublication(boolean isPublication) {
		this.isPublication = isPublication;
	}

	public boolean isTop() {
		return isTop;
	}

	public void setTop(boolean isTop) {
		this.isTop = isTop;
	}

	public boolean isRecommend() {
		return isRecommend;
	}

	public void setRecommend(boolean isRecommend) {
		this.isRecommend = isRecommend;
	}

	public String getHtmlFilePath() {
		return htmlFilePath;
	}

	public void setHtmlFilePath(String htmlFilePath) {
		this.htmlFilePath = htmlFilePath;
	}

	public int getHits() {
		return hits;
	}

	public void setHits(int hits) {
		this.hits = hits;
	}

	public long getCategoryId() {
		return categoryId;
	}

	public void setCategoryId(long categoryId) {
		this.categoryId = categoryId;
	}

	public Article getArticle() {
		return article;
	}

	public void setArticle(Article article) {
		this.article = article;
	}

	public List<Article> getArticles() {
		return articles;
	}

	public void setArticles(List<Article> articles) {
		this.articles = articles;
	}

	public Article copy() {
		Article article = new Article();
		article.setAuthor(author);
		article.setCategoryId(categoryId);
		article.setContent(content);
		article.setMetaDescription(metaDescription);
		article.setMetaKeywords(metaKeywords);
		article.setTitle(title);

		return article;
	}
}
